package com.hl.mapper;

import com.hl.pojo.ChargeStandard;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface ChargeStandardMapper {
    @Insert("insert into charge_standard (charge_type, charge_price, consultant_id) VALUE (#{chargeType},#{chargePrice},#{consultantId})")
    Integer add(ChargeStandard chargeStandard);
    @Update("update charge_standard set del = 1 where id = #{id}")
    Integer del(ChargeStandard chargeStandard);
    @Select("select * from charge_standard where charge_type = #{chargeType} and del !=1")
    List<ChargeStandard> findByType(ChargeStandard chargeStandard);
    @Select("select * from charge_standard where consultant_id = #{consultantId} and del !=1")
    List<ChargeStandard> findByConsultant(ChargeStandard chargeStandard);
}
